<template>
  <el-menu
    default-active="2"
    class="el-menu-vertical-demo"
    @open="handleOpen"
    @close="handleClose"
    background-color="#D3DCE6"
    text-color="black"
    active-text-color="rgb(255, 81, 0)"
  >
    <el-submenu index="1">
      <template slot="title">
        <i class="el-icon-office-building"></i>
        <span>查看门店</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">
          <router-link to="/StoresSystem/ShopsList" tag="div">门店列表</router-link>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-sell"></i>
        <span>上架商品</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">
          <router-link to="/StoresSystem/uploading" tag="div">上架商品</router-link>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-sold-out"></i>
        <span>库存商品</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">
          <router-link to="/StoresSystem/FinishedGoods" tag="div">查看库存</router-link>
        </el-menu-item>
        <el-menu-item index="1-1">
         <router-link to="/StoresSystem/FinishedGoodsAdd" tag="div">增加库存</router-link>
        </el-menu-item>
        <el-menu-item index="1-1">
         <router-link to="/StoresSystem/Echarts" tag="div">库存统计</router-link>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-s-order"></i>
        <span>我的订单</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">
          <router-link to="/StoresSystem/ordersList" tag="div">查看订单</router-link>
        </el-menu-item>
        <el-menu-item index="1-2">
          <router-link to="/StoresSystem/addOrders" tag="div">新增订单</router-link>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="5">
      <template slot="title">
        <i class="el-icon-setting"></i>
        <span>设置</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">
          <router-link to="/StoresSystem/" tag="div">登录</router-link>
        </el-menu-item>
        <el-menu-item index="1-2">
          <router-link to="/StoresSystem/" tag="div">注册</router-link>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      // console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      // console.log(key, keyPath);
    }
  }
};
</script>

<style>
.el-menu-item {
  padding: 0 !important;
}
</style>